home *** CD-ROM | disk | FTP | other *** search
/ Apple Reference & Presen…rary 7 (Internal Edition) / Apple R&P Lib Internal v7.0.iso / 5-Fonts & Software / Applications / Adobe Illustrator® 3.0 / Riders Folder / Adobe Illustrator EPSF Riders
Text File  |  1990-10-12  |  8KB  |  191 lines

  1. %!AI3_Riders        % signature (do not remove this line)
  2.  
  3. % Modifications to this file should be performed only by those users who are fluent in 
  4. % the PostScript® language. If you are not an experienced PostScript language
  5. % user, you should not modify this file. If you use this file, place it in the folder 
  6. % with the Adobe Illustrator® application. If you are not using this file, do not place
  7. % it in the folder with the Adobe Illustrator application because the EPSF Riders 
  8. % file can slow down the program's performance.
  9.  
  10. % This file shows how to insert custom PostScript language code into  
  11. % four different sections of an Adobe Illustrator document.
  12.  
  13. % What you put between lines beginning with double comments '%%' will 
  14. % be inserted into the file. The inserted lines will be bracketed between 
  15. % %AI3BeginRider and %AI3EndRider comments.  The Adobe Illustrator program will know to 
  16. % ignore sections of the file bracketed within these comments when reading 
  17. % a file that contains riders.
  18.  
  19. % This file contains an error handler and several sample PostScript language
  20. % code fragments to set the default flatness, screen frequency, and screen
  21. % angle of your print job.  It also contains a simple example of how
  22. % you can annotate each page of your output.  Except for the error
  23. % handler, all code fragments are commented out to disable them.
  24. % To enable a particular fragment, just remove the %• characters
  25. % from the beginning of the line.  Note that even though these code
  26. % fragments are disabled by comments, they are still written out
  27. % to all files with headers;therefore, you may wish to remove everything
  28. % that you don't need from between the lines with double comments '%%'.
  29.  
  30. % Everything BETWEEN %%BeginComments and %%EndComments will be
  31. % inserted at the end of the comments section in an Adobe Illustrator document:
  32. %-------------------
  33. %%BeginComments      % do not remove this line
  34. %%EndComments        % do not remove this line
  35.  
  36. % Everything BETWEEN %%BeginProlog and  %%EndProlog will be
  37. % inserted at the end of the prolog section in an Adobe Illustrator document:
  38. %-------------------
  39. %%BeginProlog        % do not remove this line
  40.  
  41. %----
  42. % The following statement can be used to set the default flatness for your print job.  All
  43. % objects that have a Paint Style with flatness set to 0 will use the flatness specified
  44. % here.  If this statement remains commented out, objects painted with flatness
  45. % set to 0 will use the device default. 
  46.  
  47. %•2 setflat
  48. %----
  49.  
  50. %----
  51. % The following statements can be used to set the default screen frequency and angle 
  52. % for your print job.  If these statements remain commented out, then all objects will 
  53. % use the device default screen frequency and angle.  Note that color printers have
  54. % multiple screen frequencies and angles.  See the PostScript Language Reference Manual - 
  55. % Second Edition for more information on using halftone screen operators for color printers.  
  56.  
  57. %-- set screen frequency (halftone cells per inch)
  58. %•currentscreen 3 -1 roll pop 
  59. %•30 % <- screen frequency
  60. %•3 1 roll setscreen
  61.  
  62. %-- set screen angle (degrees)
  63. %•currentscreen 3 -2 roll pop 
  64. %•30 % <- screen angle
  65. %•3 2 roll setscreen
  66. %----
  67.  
  68. %----
  69. % The following statements can be used to define your own halftone cell spot function
  70. % for your print job.  If these statements remain commented out, all objects will 
  71. % use the device default halftone cell spot function.   Note that a procedure stub
  72. % for defining your own spot function is provided, but you need to provide an implementation 
  73. % if you intend to modify the spot function.  You should not define spot functions unless 
  74. % you're an experienced PostScript language programmer.
  75.  
  76. %-- set  halftone cell spot function
  77. %•currentscreen  pop 
  78. %•{}     % <- halftone cell spot function must be inserted inside curly braces
  79. %•setscreen
  80. %----
  81.  
  82. %----
  83. % A simple procedure to print a string at the bottom of a page.
  84. % Can be called by annotatepage (see below) if you wish.
  85. %
  86. %•/PrintX        % string PrintX -
  87. %•{
  88. %• count 0 gt 
  89. %•    {
  90. %•  dup type /stringtype eq 
  91. %•        {
  92. %•        /Helvetica findfont 9 scalefont setfont
  93. %•        36 36 moveto
  94. %•        show 
  95. %•        } if 
  96. %•    } if
  97. %•} bind def
  98.  
  99. %----
  100. % The following procedure is called by the Adobe Illustrator prolog during the print job immediately 
  101. % before the showpage operator is executed.  You may use this procedure to perform operations like
  102. % placing a logo or other information on each page.
  103.  
  104. %•/annotatepage
  105. %•{
  106. %•gsave initgraphics
  107. % Insert your PostScript language code between the %===  lines below
  108. %=====================================
  109. %•(From the desk of <your name here?>) PrintX 
  110. %=====================================
  111. %•grestore
  112. %•} def
  113. %----
  114.     
  115.     
  116. %----
  117. % The following statements define an error handler that prints out diagnostics
  118. % on the output media if the print job fails due to a PostScript error.
  119. %
  120.  
  121. % Standard Error Handler
  122.  
  123. /$brkpage 64 dict def $brkpage begin
  124. /prnt
  125.  {dup type/stringtype ne{=string cvs}if dup length 6 mul/tx exch def/ty 10 def
  126.   currentpoint/toy exch def/tox exch def 1 setgray newpath
  127.   tox toy 2 sub moveto 0 ty rlineto tx 0 rlineto 0 ty neg rlineto
  128.   closepath fill tox toy moveto 0 setgray show}bind def
  129. /nl{currentpoint exch pop lmargin exch moveto 0 -10 rmoveto}def
  130. /=={/cp 0 def typeprint nl}def
  131. /typeprint{dup type exec}readonly def
  132. /lmargin 72 def
  133. /rmargin 72 def
  134. /tprint
  135.    {dup length cp add rmargin gt{nl/cp 0 def}if
  136.     dup length cp add/cp exch def prnt}readonly def
  137. /cvsprint{=string cvs tprint( )tprint}readonly def
  138. /integertype{cvsprint}readonly def
  139. /realtype{cvsprint}readonly def
  140. /booleantype{cvsprint}readonly def
  141. /operatortype{(--)tprint =string cvs tprint(-- )tprint}readonly def
  142. /marktype{pop(-mark- )tprint}readonly def
  143. /dicttype{pop(-dictionary- )tprint}readonly def
  144. /nulltype{pop(-null- )tprint}readonly def
  145. /filetype{pop(-filestream- )tprint}readonly def
  146. /savetype{pop(-savelevel- )tprint}readonly def
  147. /fonttype{pop(-fontid- )tprint}readonly def
  148. /nametype{dup xcheck not{(/)tprint}if cvsprint}readonly def
  149. /stringtype
  150.  {dup rcheck{(\()tprint tprint(\))tprint}{pop(-string- )tprint}ifelse
  151.  }readonly def
  152. /arraytype
  153.  {dup rcheck{dup xcheck
  154.   {({)tprint{typeprint}forall(})tprint}
  155.   {([)tprint{typeprint}forall(])tprint}ifelse}{pop(-array- )tprint}ifelse
  156.  }readonly def
  157. /packedarraytype
  158.  {dup rcheck{dup xcheck
  159.   {({)tprint{typeprint}forall(})tprint}
  160.   {([)tprint{typeprint}forall(])tprint}ifelse}{pop(-packedarray- )tprint}ifelse
  161.  }readonly def
  162. /courier/Courier findfont 10 scalefont def
  163. end %$brkpage
  164. errordict/handleerror
  165.  {systemdict begin $error begin $brkpage begin newerror
  166.    {/newerror false store 
  167.     vmstatus pop pop 0 ne{grestoreall}if initgraphics courier setfont
  168.     lmargin 720 moveto(ERROR: )prnt errorname prnt
  169.     nl(OFFENDING COMMAND: )prnt/command load prnt
  170.     $error/ostack 
  171.     known{nl nl(STACK:)prnt nl nl $error/ostack get aload length{==}repeat}if
  172.     systemdict/showpage get exec(%%[ Error: )print
  173.     errorname =print(; OffendingCommand: )print/command 
  174.     load =print( ]%%)= flush}if end end end}
  175. dup 0 systemdict put dup 4 $brkpage put bind readonly put
  176. %----
  177.  
  178. %%EndProlog          % do not remove this line
  179.  
  180. %-------------------
  181. % Everything BETWEEN %%BeginSetup and %%EndSetup will be
  182. % inserted at the end of the setup section in an Adobe Illustrator document:
  183. %%BeginSetup         % do not remove this line
  184. %%EndSetup           % do not remove this line
  185.  
  186. %-------------------
  187. % Everything BETWEEN %%Trailer and %%EOF will be
  188. % inserted at the end of the trailer section in an Adobe Illustrator document:
  189. %%Trailer            % do not remove this line
  190. %%EOF                % do not remove this line
  191.